Change in openvpn[master]: Preserve ifconfig(_ipv6)_local across reconnect
A message that is not in the archive (sent off-list or not yet received): gerrit.1759751230000.I9b099924286f9bccb6833e1e40606abe72714bbb@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
to review the following change.
Change subject: Preserve ifconfig(_ipv6)_local across reconnect
......................................................................
Preserve ifconfig(_ipv6)_local across reconnect
Turns out that ifconfig_(ipv6)_local options are set once and are not reset on a reconnect.
Consider following scenario:
- connect first time, server pushes ifconfig-ipv6
- add a ipv6 network route because ifconfig_ipv6_local is set
- reconnect, server doesn't push ifconfig-ipv6
Because of ifconfig_ipv6_local is not reset and holds the value set by the first connect, client adds a ipv6 network route - but this is wrong, since ipv6 wasn't pushed this time by the server.
Fix by saving/restoring ifconfig(_ipv6)_local in a struct options_pre_connect along with other options which preserves the initial values until --pull modifications are applied.
---
M src/openvpn/options.c
M src/openvpn/options.h
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/1248/1
src/openvpn/options.c +6 -0
@@ -3143,6 +3143,9 @@ o->pre_connect->client_nat_defined = true; } + o->pre_connect->ifconfig_local = o->ifconfig_local; + o->pre_connect->ifconfig_ipv6_local = o->ifconfig_ipv6_local; + o->pre_connect->route_default_gateway = o->route_default_gateway; o->pre_connect->route_ipv6_default_gateway = o->route_ipv6_default_gateway;
@@ -3193,6 +3196,9 @@ o->routes_ipv6 =NULL ; } + o->ifconfig_local = pp->ifconfig_local; + o->ifconfig_ipv6_local = pp->ifconfig_ipv6_local; + o->route_default_gateway = pp->route_default_gateway; o->route_ipv6_default_gateway = pp->route_ipv6_default_gateway;
src/openvpn/options.h +3 -0
@@ -64,6 +64,9 @@bool tuntap_options_defined;struct tuntap_options tuntap_options; +const char *ifconfig_local; +const char *ifconfig_ipv6_local; +bool routes_defined;struct route_option_list *routes;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Gerrit-Change-Number: 1248
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Attention is currently required from: flichtenheld, plaisthos, stipa.
cron2 has posted comments on this change by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email )
Change subject: Preserve ifconfig(_ipv6)_local across reconnect
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Gerrit-Change-Number: 1248
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Thu, 09 Oct 2025 17:18:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: cron2, flichtenheld, plaisthos, stipa.
cron2 has uploaded a new patch set (#2) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.
Change subject: Preserve ifconfig(_ipv6)_local across reconnect
......................................................................
Preserve ifconfig(_ipv6)_local across reconnect
Turns out that ifconfig_(ipv6)_local options are set once and are not reset on a reconnect.
Consider following scenario:
- connect first time, server pushes ifconfig-ipv6
- add a ipv6 network route because ifconfig_ipv6_local is set
- reconnect, server doesn't push ifconfig-ipv6
Because of ifconfig_ipv6_local is not reset and holds the value set by the first connect, client adds a ipv6 network route - but this is wrong, since ipv6 wasn't pushed this time by the server.
Fix by saving/restoring ifconfig(_ipv6)_local in a struct options_pre_connect along with other options which preserves the initial values until --pull modifications are applied.
Github: OpenVPN/openvpn#850
---
M src/openvpn/options.c
M src/openvpn/options.h
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/1248/2
src/openvpn/options.c +6 -0
@@ -3143,6 +3143,9 @@ o->pre_connect->client_nat_defined = true; } + o->pre_connect->ifconfig_local = o->ifconfig_local; + o->pre_connect->ifconfig_ipv6_local = o->ifconfig_ipv6_local; + o->pre_connect->route_default_gateway = o->route_default_gateway; o->pre_connect->route_ipv6_default_gateway = o->route_ipv6_default_gateway;
@@ -3193,6 +3196,9 @@ o->routes_ipv6 =NULL ; } + o->ifconfig_local = pp->ifconfig_local; + o->ifconfig_ipv6_local = pp->ifconfig_ipv6_local; + o->route_default_gateway = pp->route_default_gateway; o->route_ipv6_default_gateway = pp->route_ipv6_default_gateway;
src/openvpn/options.h +3 -0
@@ -64,6 +64,9 @@bool tuntap_options_defined;struct tuntap_options tuntap_options; +const char *ifconfig_local; +const char *ifconfig_ipv6_local; +bool routes_defined;struct route_option_list *routes;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Gerrit-Change-Number: 1248
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
PATCH v2 1/1 Preserve ifconfig(_ipv6)_local across reconnect
In reply to a message not in the archiveFrom: Lev Stipakov <[email protected]...>
Turns out that ifconfig_(ipv6)_local options are set once and are not reset on a reconnect.
Consider following scenario:
- connect first time, server pushes ifconfig-ipv6
- add a ipv6 network route because ifconfig_ipv6_local is set
- reconnect, server doesn't push ifconfig-ipv6
Because of ifconfig_ipv6_local is not reset and holds the value set by the first connect, client adds a ipv6 network route - but this is wrong, since ipv6 wasn't pushed this time by the server.
Fix by saving/restoring ifconfig(_ipv6)_local in a struct options_pre_connect along with other options which preserves the initial values until --pull modifications are applied.
Github: OpenVPN/openvpn#850
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
This mail reflects revision 2 of this Change.
Acked-by according to Gerrit (reflected above):
src/openvpn/options.c +6 -0
@@ -3143,6 +3143,9 @@ o->pre_connect->client_nat_defined = true; } + o->pre_connect->ifconfig_local = o->ifconfig_local; + o->pre_connect->ifconfig_ipv6_local = o->ifconfig_ipv6_local; + o->pre_connect->route_default_gateway = o->route_default_gateway; o->pre_connect->route_ipv6_default_gateway = o->route_ipv6_default_gateway;
@@ -3193,6 +3196,9 @@ o->routes_ipv6 =NULL ; } + o->ifconfig_local = pp->ifconfig_local; + o->ifconfig_ipv6_local = pp->ifconfig_ipv6_local; + o->route_default_gateway = pp->route_default_gateway; o->route_ipv6_default_gateway = pp->route_ipv6_default_gateway;
src/openvpn/options.h +3 -0
@@ -64,6 +64,9 @@bool tuntap_options_defined;struct tuntap_options tuntap_options; +const char *ifconfig_local; +const char *ifconfig_ipv6_local; +bool routes_defined;struct route_option_list *routes;
[Openvpn-devel] [PATCH applied] Re: Preserve ifconfig(_ipv6)_local across reconnect
Tested, fixes a larger part of the issue in #850, opens the way for a new issue in #863 (something "not working right" that was working "not at all" without this).
Your patch has been applied to the master branch.
commit 8a8360fc176b3996bfefee0ea894dc5c8a9ead1a
Author: Lev Stipakov Date: Thu Oct 9 19:19:11 2025 +0200
Preserve ifconfig(_ipv6)_local across reconnect
Signed-off-by: Lev Stipakov <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59244523/
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#3) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email )
Change subject: Preserve ifconfig(_ipv6)_local across reconnect
......................................................................
Preserve ifconfig(_ipv6)_local across reconnect
Turns out that ifconfig_(ipv6)_local options are set once and are not reset on a reconnect.
Consider following scenario:
- connect first time, server pushes ifconfig-ipv6
- add a ipv6 network route because ifconfig_ipv6_local is set
- reconnect, server doesn't push ifconfig-ipv6
Because of ifconfig_ipv6_local is not reset and holds the value set by the first connect, client adds a ipv6 network route - but this is wrong, since ipv6 wasn't pushed this time by the server.
Fix by saving/restoring ifconfig(_ipv6)_local in a struct options_pre_connect along with other options which preserves the initial values until --pull modifications are applied.
Github: OpenVPN/openvpn#850
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59244523/
---
M src/openvpn/options.c
M src/openvpn/options.h
2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/1248/3
src/openvpn/options.c +6 -0
@@ -3143,6 +3143,9 @@ o->pre_connect->client_nat_defined = true; } + o->pre_connect->ifconfig_local = o->ifconfig_local; + o->pre_connect->ifconfig_ipv6_local = o->ifconfig_ipv6_local; + o->pre_connect->route_default_gateway = o->route_default_gateway; o->pre_connect->route_ipv6_default_gateway = o->route_ipv6_default_gateway;
@@ -3193,6 +3196,9 @@ o->routes_ipv6 =NULL ; } + o->ifconfig_local = pp->ifconfig_local; + o->ifconfig_ipv6_local = pp->ifconfig_ipv6_local; + o->route_default_gateway = pp->route_default_gateway; o->route_ipv6_default_gateway = pp->route_ipv6_default_gateway;
src/openvpn/options.h +3 -0
@@ -64,6 +64,9 @@bool tuntap_options_defined;struct tuntap_options tuntap_options; +const char *ifconfig_local; +const char *ifconfig_ipv6_local; +bool routes_defined;struct route_option_list *routes;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Gerrit-Change-Number: 1248
Gerrit-PatchSet: 3
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email )
Change subject: Preserve ifconfig(_ipv6)_local across reconnect
......................................................................
Preserve ifconfig(_ipv6)_local across reconnect
Turns out that ifconfig_(ipv6)_local options are set once and are not reset on a reconnect.
Consider following scenario:
- connect first time, server pushes ifconfig-ipv6
- add a ipv6 network route because ifconfig_ipv6_local is set
- reconnect, server doesn't push ifconfig-ipv6
Because of ifconfig_ipv6_local is not reset and holds the value set by the first connect, client adds a ipv6 network route - but this is wrong, since ipv6 wasn't pushed this time by the server.
Fix by saving/restoring ifconfig(_ipv6)_local in a struct options_pre_connect along with other options which preserves the initial values until --pull modifications are applied.
Github: OpenVPN/openvpn#850
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
Message-Id: <[email protected]...>
URL: https://sourceforge.net/p/openvpn/mailman/message/59244523/
---
M src/openvpn/options.c
M src/openvpn/options.h
2 files changed, 9 insertions(+), 0 deletions(-)
src/openvpn/options.c +6 -0
@@ -3143,6 +3143,9 @@ o->pre_connect->client_nat_defined = true; } + o->pre_connect->ifconfig_local = o->ifconfig_local; + o->pre_connect->ifconfig_ipv6_local = o->ifconfig_ipv6_local; + o->pre_connect->route_default_gateway = o->route_default_gateway; o->pre_connect->route_ipv6_default_gateway = o->route_ipv6_default_gateway;
@@ -3193,6 +3196,9 @@ o->routes_ipv6 =NULL ; } + o->ifconfig_local = pp->ifconfig_local; + o->ifconfig_ipv6_local = pp->ifconfig_ipv6_local; + o->route_default_gateway = pp->route_default_gateway; o->route_ipv6_default_gateway = pp->route_ipv6_default_gateway;
src/openvpn/options.h +3 -0
@@ -64,6 +64,9 @@bool tuntap_options_defined;struct tuntap_options tuntap_options; +const char *ifconfig_local; +const char *ifconfig_ipv6_local; +bool routes_defined;struct route_option_list *routes;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1248?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Gerrit-Change-Number: 1248
Gerrit-PatchSet: 3
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>